<?php



?>

<link href="<?php  echo Yii::app()->request->baseUrl; ?>/js/jquery/ui-timepicker/style.css" type="text/css" rel="stylesheet">
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery/ui-timepicker/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery/ui-timepicker/i18n/ui.datepicker-zh-TW.js"   type="text/javascript"></script>

<!-- TinyMCE -->
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/tinymce/tiny_mce.js"     type="text/javascript"></script>
<script src="<?php echo Yii::app()->request->baseUrl; ?>/js/tinymce/config_basic.js" type="text/javascript"></script>
<!-- /TinyMCE -->


<?php include $this->getLayoutFile('block_top_messages'); ?>
<form class="form1" method="post" action="<?php echo $requestAction; ?>">

    <fieldset>
        <legend> 修改 </legend>

        <div class="leftBlock">

            <div class="field">
                <label for="topic"> topic </label>
                <div class="show"><input type="text" id="topic" name="topic" value="<?php echo $blogArticleText->getTopic(); ?>" /></div>
                <div class="info"></div>
                <?php $errorField="topic"; include $this->getLayoutFile('block_fields'); ?>
            </div>

            <div class="field">
                <label for="text"> text </label>
                <div class="show"><textarea id="text" name="text"><?php echo $blogArticleText->getText(); ?></textarea></div>

                <div class="info"></div>
                <?php $errorField="text"; include $this->getLayoutFile('block_fields'); ?>
            </div>

        </div>
        <div class="rightBlock">
            
            <div class="field">
                <label for="status"> status </label>
                <div class="show">
                    <select id="status" name="status">
                        <?php 
                            foreach( $blogArticle->getStatusList('status') as $name => $id ) {
                                $selected = '';
                                if( $blogArticle->getStatus()==$id ) {
                                    $selected = ' selected="selected" ';
                                }
                                echo "<option value='{$id}' {$selected} >". $blogArticle->trByName($name) ."</option>";
                            }
                        ?>
                    </select>
                </div>
                <div class="info"></div>
                <?php $errorField="status"; include $this->getLayoutFile('block_fields'); ?>
            </div>

        </div>
        <div class="submitBlock">

            <input class="submit" type="submit" value="更新" />

        </div>
    </fieldset>

</form>

<script type="text/javascript">

    var responseJsonData = {};
    responseJsonData.nameKey = 'adminBlogArticle';
    responseJsonData.action = 'edit';
    
    $('#birthday').datetimepicker({
        changeYear: true,
        yearRange: '1900:',
        // showTimepicker: false,
    });

</script>
